docs(process): un-stub implemented id-keyed write-stdin/close-stdin#14
Conversation
The persistent-tier registry landed in astrid-runtime/astrid#867: the id-keyed write-stdin/close-stdin are implemented (pipe retained host-side, survives pooled-instance reset, 1 MiB cap, backpressure, ownership-checked, audited). Drops the stale (NOT YET IMPLEMENTED) tags on those two funcs and corrects the two PERSISTENT TIER banners that claimed the whole tier was stubbed 'until the registry lands'. The ProcessHandle (ephemeral) write-stdin/close-stdin, attach, and watch/unwatch remain genuinely deferred and keep their notes.
There was a problem hiding this comment.
Code Review
This pull request updates the documentation comments in host/[email protected] to reflect that the persistent registry has landed and its shapes are frozen. It also details the behavior and constraints of the write-stdin and close-stdin functions. The review feedback points out minor inconsistencies in terminology (using '1 MiB' instead of '1 MB') and spelling ('re-attached' instead of 'reattached') compared to the rest of the file.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| /// Caps at 1 MiB/call (`too-large` above that); returns bytes written. The | ||
| /// retained pipe lives in the host registry, so a later instance that | ||
| /// re-attached keeps writing to the same child across pooled-instance |
There was a problem hiding this comment.
There are a couple of minor inconsistencies introduced in these new comments:
- Terminology (1 MiB vs 1 MB): The new comment uses
1 MiB/call, whereas other parts of the file (such as thetoo-largeerror on line 60 and the ephemeralwrite-stdinon line 382) use1 MB. It would be best to standardize on eitherMiBorMBthroughout the file depending on the exact byte limit enforced by the host. - Spelling (re-attached vs reattached): The term
reattachis used without a hyphen everywhere else in this file (e.g., lines 20, 203, 334, 466). Usingreattachedhere maintains consistency.
/// Caps at 1 MiB/call (too-large error above that); returns bytes written. The
/// retained pipe lives in the host registry, so a later instance that
/// reattached keeps writing to the same child across pooled-instance
The un-stub text claimed write-stdin is "all-or-nothing per call, so framed stdin is never torn". The host writes via write_all over a pipe, which can deliver a prefix before an I/O error and then marks the stream closed, so a failed write is NOT atomic and CAN tear a frame. Pipe writes are atomic only up to PIPE_BUF for a single write(), never for a 1 MiB write_all, so the contract cannot promise this. State the real semantics: a successful return wrote every byte; an error may have delivered a prefix and closes the stream.
…e-stdin WIT (#871) ## Linked Issue Closes #870 ## Summary The id-keyed persistent `write-stdin` / `close-stdin` were implemented in #867 (the registry retains the child's stdin pipe host-side, survives pooled-instance reset, 1 MiB-capped, backpressured, ownership-checked, audited) but had **no test**, and the WIT still tagged them `(NOT YET IMPLEMENTED)`. This adds the acceptance test and un-stubs the now-accurate WIT docs. Doc-only on the contract — no signature change. ## Changes - **Test** (`registry_tests.rs`): write-stdin delivers bytes to a persistent child; a second by-id write (needing only registry + id — exactly what a post-reset instance holds) still reaches the same child; `close-stdin` → clean EOF exit; over-cap → `too-large`; wrong-owner → `no-such-process`; post-close → `closed`. - **WIT** (submodule bump → astrid-runtime/wit#14): drops the stale `(NOT YET IMPLEMENTED)` tags on the id-keyed forms and corrects the two `PERSISTENT TIER` "stubbed until the registry lands" banners. Restages `wit-staging`. Signatures unchanged. - The ephemeral `ProcessHandle` form, `attach`, and `watch` / `unwatch` stay genuinely deferred and tagged. - CHANGELOG updated under `[Unreleased]`. ## Test Plan ### Automated - [x] `cargo test --workspace` passes - [x] No new clippy warnings Specifically: `cargo test -p astrid-capsule registry_tests` (the new acceptance test + existing registry tests pass); build green (WIT parses via bindgen). ## Checklist - [x] Linked to an issue - [x] CHANGELOG.md updated under `[Unreleased]`
The persistent-tier registry landed in astrid-runtime/astrid#867 — the id-keyed write-stdin/close-stdin are implemented (pipe retained host-side, survives pooled-instance reset, 1 MiB cap, backpressure, ownership-checked, audited). Drops the stale (NOT YET IMPLEMENTED) tags on those two funcs and corrects the two PERSISTENT TIER banners that claimed the whole tier was stubbed until the registry lands. Doc-only: signatures unchanged, no wire/binding impact. The ProcessHandle (ephemeral) write-stdin/close-stdin, attach, and watch/unwatch remain genuinely deferred and keep their notes.